package com.fand.manager.controller;

import javax.annotation.Resource;

import com.fand.manager.model.es.SysUserLoginReturnDTO;
import com.fand.manager.service.ISysUserESIndexRecordService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * Author: zhangjiabin
 * Email: javaboyok@163.com
 * CreateDate: 2021/6/24
 * Version: 1.0
 */
@Controller
public class WelcomController {

    @Resource
    private ISysUserESIndexRecordService sysUserESIndexRecordService;

    @GetMapping("/welcome")
    public String welcome(Model model) {
        SysUserLoginReturnDTO sysUserLoginReturnDTO = sysUserESIndexRecordService.realTimeData();

        model.addAttribute("loginSum",sysUserLoginReturnDTO.getLoginSum());

        return "welcome";
    }
}
